from flask import Blueprint,jsonify,request

one = Blueprint('one',__name__)

@one.route('/update',methods=['POST','GET'])
def update_lod():
    if request.method == 'GET':
        with open('1.txt', 'r', encoding='utf8') as f:
            fount = f.readlines()
        return fount
    else:
        fount = request.form.get('fount')
        with open('1.txt','w',encoding='utf8') as k:
            k.writelines(fount + '\n')
            return 'OK'


# @one.route('/one',methods=['POST'])
# def view1():
#     return jsonify('你真帅！！')
